//
//  UITableView+IndexPath.m
//  mmbang
//
//  Created by 倪元政 on 2016/11/22.
//  Copyright © 2016年 iyaya. All rights reserved.
//

#import "UITableView+IndexPath.h"

@implementation UITableView (IndexPath)

-(BOOL)containsIndexPath:(NSIndexPath *)indexPath{
    BOOL flag = NO;
    if (indexPath) {
        NSInteger sections = [self numberOfSections];
        if (indexPath.section < sections) {
            NSInteger rows = [self numberOfRowsInSection:indexPath.section];
            if (indexPath.row < rows) {
                flag = YES;
            }
        }
    }
    return flag;
}

@end
